import request from '@/utils/request'

// 获取组织列表
export function getDepartmentList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 删除部门
export function deleteDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
// 新增部门
export function addDepartment(data) {
  console.log(data)
  return request({
    url: `/company/department`,
    method: 'POST',
    data
  })
}
// 修改 部门
export function editDepartment(id, data) {
  return request({
    url: `/company/department/${id}`,
    method: 'PUT',
    data
  })
}
// 获取人员列表
export function getDepartmentInfo() {
  return request({
    url: `/sys/user/simple`,
    method: 'GET'
  })
}
